-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rfxcom] Add ability to properly receive configured command ids, deprecate hard-coded guesses #10940
Conversation
Making draft for now, forgot to clean up how messages are matched to things. |
800bb0d
to
753361d
Compare
...src/test/java/org/openhab/binding/rfxcom/internal/messages/RFXComUndecodedRFMessageTest.java
Outdated
Show resolved
Hide resolved
6d62821
to
a120701
Compare
…ecated hard-coded guesses. Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]>
a120701
to
e3de13b
Compare
Glad I set to draft, because this wasn't setting the pulse and was crashing the hardware. Now fixed and some extra tests added. This is now ready for review. Once (if) this goes in, I'll add a suitable note to https://github.com/openhab/openhab-distro/blob/main/distributions/openhab/src/main/resources/bin/update.lst. |
@Jamstah should this be marked as a bug or enhancement? |
Marked where? I'd say enhancement |
See openhab/openhab-addons#10940 Signed-off-by: James Hewitt-Thomas <[email protected]>
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]> Signed-off-by: dw-8 <[email protected]>
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]> Signed-off-by: dw-8 <[email protected]>
…ds, deprecated hard-coded guesses. (openhab#10940)" This reverts commit 8352f7a.
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]> Signed-off-by: dw-8 <[email protected]>
…ds, deprecated hard-coded guesses. (openhab#10940)" This reverts commit 8352f7a. Signed-off-by: dw-8 <[email protected]>
See openhab/openhab-addons#10940 Signed-off-by: James Hewitt-Thomas <[email protected]>
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]> Signed-off-by: Dave J Schoepel <[email protected]>
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]>
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]>
…ecated hard-coded guesses. (openhab#10940) Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands. This PR changes the message factory to require either bytes (from the RFXcom device) or all the details required to make a transmissable message, including the confguration of the associated Thing. At the moment, this is only used by lighting4 and raw types, but I expect it will be useful for others in the future. The hard-coded ON/OFF commands in lighting4 are based on experimentation with different devices, and are not at all consistent. This PR deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities. Signed-off-by: James Hewitt <[email protected]>
Currently, when a message is received the command will be determined only from the hard-coded set of ON/OFF commands, which means if I configure a thing and attach it to a switch there is no guarantee that it will respond as expected to receive commands.
The hard-coded ON/OFF commands are based on experimentation with different devices, and are not at all consistent. This commit also deprecates the use of those so that in a future release, Lighting4 devices will only work when configured with the correct command ids up front. This will resolve inconsistent behaviour where devices that have been discovered may work correctly, work only for ON or OFF but not both, have ON and OFF the wrong way around, turn ON one physical device and OFF another, or any combination of those possibilities.
Signed-off-by: James Hewitt [email protected]